home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
tk_bar
/
tkbar.frm
< prev
next >
Wrap
Text File
|
1993-12-06
|
3KB
|
121 lines
VERSION 2.00
Begin Form frmButtonBar
BackColor = &H00000000&
BorderStyle = 0 'None
Caption = "ButtonBar"
ClientHeight = 1560
ClientLeft = 2115
ClientTop = 1800
ClientWidth = 3630
ClipControls = 0 'False
Height = 1995
Icon = TKBAR.FRX:0000
Left = 2040
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 104
ScaleMode = 3 'Pixel
ScaleWidth = 242
Top = 1440
Visible = 0 'False
Width = 3780
Begin PictureBox picTempIcon
AutoRedraw = -1 'True
AutoSize = -1 'True
BackColor = &H00C0C0C0&
BorderStyle = 0 'None
ClipControls = 0 'False
Height = 495
Left = 1170
ScaleHeight = 33
ScaleMode = 3 'Pixel
ScaleWidth = 52
TabIndex = 1
Top = 870
Width = 780
End
Begin SSCommand cmdIcon
Font3D = 0 'None
ForeColor = &H00000000&
Height = 570
Index = 0
Left = 150
Outline = 0 'False
RoundedCorners = 0 'False
TabIndex = 0
Top = 15
Width = 570
End
Begin Menu mnuDummy
Caption = "mnuDummyTop"
Enabled = 0 'False
Visible = 0 'False
Begin Menu mnuConfigure
Caption = "Configure..."
End
Begin Menu mnuDummy2
Caption = "-"
End
Begin Menu mnuAbout
Caption = "About..."
End
End
End
Option Explicit
Sub cmdIcon_Click (Index As Integer)
'
' Get the focus off the button. Otherwise, a nasty
' black border stays there.
' Then DoEvents to make sure it's redrawn...
'
picTempIcon.SetFocus
DoEvents
Call ButtonBarExecute(Index)
End Sub
Sub cmdIcon_MouseDown (Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 2 Then PopupMenu mnuDummy, 0, 0, 0
End Sub
Sub cmdIcon_MouseUp (Index As Integer, Button As Integer, Shift As Integer, X As Single, Y As Single)
Dim Cond1%, Cond2%
' get focus off the button to get rid of black border
' if dragged mouse down off the current button
Me.ScaleMode = 1
Cond1 = (Y > Me!cmdIcon(Index).Height) Or (Y < 0)
Cond2 = (X > Me!cmdIcon(Index).Width) Or (X < 0)
If Cond1 Or Cond2 Then
picTempIcon.SetFocus
DoEvents
End If
End Sub
Sub Form_Load ()
picTempIcon.Top = 0
picTempIcon.Left = -200
Top = 0
Left = 0
End Sub
Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)
Call IniSave
End Sub
Sub mnuAbout_Click ()
frmAbout.Show 1
End Sub
Sub mnuConfigure_Click ()
frmConfig.Show 1
End Sub